package fun.chutianshu.eescore_08_shiro.mappers;

import fun.chutianshu.eescore_08_shiro.entity.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserInfoMapper {

    //根据姓名找用户
    @Select("SELECT * FROM UserInfo WHERE user_name = #{user_name}")
    UserInfo findByName(@Param("user_name") String user_name);

    //所有用户
    @Select("select * from UserInfo")
    List<UserInfo> getAll();
}
